<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/template.xhtml">
	<ui:define name="content">

		<h:form id="form">
			<p:panel>
				<f:facet name="header">
					<h:outputText value="Cadastro Licitação" />
				</f:facet>
				<h:panelGrid columns="2">
					<h:outputLabel value="Nome" />
					<h:inputText value="#{licitacaoAction.licitacao.nome}" />
					<h:outputLabel value="Descrição" />
					<h:inputText value="#{licitacaoAction.licitacao.descricao}" />
					<h:outputLabel value="Data Inicio" />
					<p:calendar value="#{licitacaoAction.licitacao.dtInicio}" />
					<h:outputLabel value="Data Fim" />
					<p:calendar value="#{licitacaoAction.licitacao.dtFim}" />
					<h:commandButton value="Cadastrar"
						action="#{licitacaoAction.salvar}" />
					<h:commandButton value="Limpar" />
				</h:panelGrid>
			</p:panel>
			<p:panel>
			<f:facet name="header">
				<h:outputText value="Licitações" />
			</f:facet>
				<h:dataTable value="#{licitacaoAction.licitacaos}" var="lct">
					<p:column>
						<f:facet name="header">
							<h:outputText value="Nome" />
						</f:facet>
						<h:commandLink value="#{lct.nome}"
							action="#{licitacaoAction.carregarLicitacao}"></h:commandLink>
						<!-- <h:outputText value="#{lct.nome}"/> -->
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Descrição" />
						</f:facet>
						<h:outputText value="#{lct.descricao}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Data Inicio" />
						</f:facet>
						<h:outputText value="#{lct.dtInicio}" />
					</p:column>
					<p:column>
						<f:facet name="header">
							<h:outputText value="Data Fim" />
						</f:facet>
						<h:outputText value="#{lct.dtFim}" />
					</p:column>
				</h:dataTable>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>
</html>